package person.bing.fbcloud.leetcode;

/**
 * @author: mengfanbing
 * @date: 2020/11/19 9:32
 */
public class Q283 {
    public static void main(String[] args) {

    }

    public static void moveZeroes(int[] nums) {
        int length = nums.length;
        for (int i=0;i<length;i++){
            if (nums[i] == 0){
                for (int j=i+1;j<length;j++){
                    if (nums[j] != 0){
                        nums[i] = nums[j];
                        nums[j] = 0;
                        break;
                    }
                }
            }
        }
    }
}
